#pragma once

#include "application/pathfinding/pathfinding_graph.h"
#include <QString>
#include <QVector>
#include <memory>
#include <unordered_map>
#include <string>
#include <vector>

namespace application {
namespace pathfinding {

class CbsSolver {
public:
    CbsSolver() = default;
    ~CbsSolver() = default;

    // Build internal roadmap from a PathfindingGraph
    void buildFromGraph(PathfindingGraphPtr graph);

    // Solve a single-agent route using CBS on the roadmap.
    // Returns true on success and fills route with station IDs.
    bool planSingleAgent(const QString& startId,
                         const QString& goalId,
                         QVector<QString>& route) const;

private:
    // Opaque roadmap representation (defined in .cpp to avoid leaking boost headers)
    struct Impl;
    std::shared_ptr<Impl> impl_;
};

} // namespace pathfinding
} // namespace application
